package com.springboot.service.condition;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

/**
 * @Author: qinqiang
 * @Date: 2020/7/24 15:22
 */
public class TaskFilterCondition implements Condition {


    @Override
    public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) {
        //获取配置文件中scheduled.filter的值
        String filterschedule = conditionContext.getEnvironment().getProperty("scheduled.filter");
//        return "true".equals(filterschedule);
        return false;
    }

}
